<?php
 /**
 * Example Application

 * @package Example-application
 */

require 'config.php';

$smarty = new Smarty;
$cid = $_GET['cid'];
$result = mysql_query("select a.*, c.name as cname from article a left join catalog c on a.cid=c.id  where a.cid=".$cid." order by id desc limit 10");
while($row = mysql_fetch_array($result)){
	$arr[] = array("id"=>$row[id],"title"=>$row[title],"content"=>$row[content],"cid"=>$row[cid],"cname"=>$row[cname],"addDate"=>$row[addDate]);
}
$smarty->assign("per",$arr);
$smarty->assign("boolean",'none');
$smarty->assign('title','G.J');

$smarty->force_compile = true;
//$smarty->debugging = true;
$smarty->caching = true;
$smarty->cache_lifetime = 120;
$smarty->display('index.tpl');
?>
